﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Yj_model : MonoBehaviour {
    public  GameObject yj=null;
    public  GameObject yja=null;
    public  GameObject yjb=null;
    public  GameObject yjb0 = null;
    public  ArrayList yjp=new ArrayList();
    public  string yjname;

    // Use this for initialization
    void Start () {
       

        
    }


    private void Awake()
    {
        yj_init();
        if (yjb)
        {
            yjb.SetActive(false);
        }
    }

    private void Update()
    {

    }
    //初始化所有元件
    void yj_init()
    {
        yjname=gameObject.name;
        yja = GameObject.Find(yjname+"_a");
        yjb = GameObject.Find(yjname + "_b");
        yjb0 = GameObject.Find(yjname + "_b0");
        int i = 1;
        GameObject yjptmp ;
        do
        {   
            yjptmp =GameObject.Find(yjname + "_p" + i.ToString());
            if (yjptmp)
            {
                yjp.Add(yjptmp);
                //Debug.Log("yjpname:" + yjptmp.name);
            }
            i++;
        } while (yjptmp);
    }





}
